Don't save to history from 'eshell-command' when aborting
authorJim Porter <jporterbugs@gmail.com>
Sat, 13 Jul 2024 18:43:42 +0000 (11:43 -0700)
committerJim Porter <jporterbugs@gmail.com>
Mon, 15 Jul 2024 16:10:30 +0000 (09:10 -0700)
commit3407e274999ce80582932332b108d84fba69d107
tree82ef65684dc590b458d7f23e1d3ec6555db662f1
parent5ec73eca57c09ad1a33c56dc4cd5b965cfaef063
Don't save to history from 'eshell-command' when aborting

* lisp/eshell/eshell.el (eshell-add-input-to-history)
(eshell--save-history): Declare.
(eshell-command-mode-exit): New function...
(eshell-command-mode): ... use it.

* lisp/eshell/em-hist.el (eshell-hist-initialize): Don't handle
minibuffer logic here.  Always read history file (this ensures that
'eshell-command' can see the history, too).
(eshell-add-command-to-history): Remove.
lisp/eshell/em-hist.el
lisp/eshell/eshell.el